import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/locationbuilding/` + url, ...arg)

/**
 * 楼宇Api接口管理器
 *
 * @author kongxm
 * @date  2022/11/06 21:07
 **/
export default {
	// 获取楼宇分页
	bizLocationBuildingPage(data) {
		return request('page', data, 'get')
	},
	// 获取楼宇列表
	bizLocationBuildingList(data) {
		return request('list', data, 'get')
	},
	// 提交楼宇表单 edit为true时为编辑，默认为新增
	bizLocationBuildingSubmitForm(data, edit = false) {
		return request(edit ? 'add' : 'edit', data)
	},
	// 删除楼宇
	bizLocationBuildingDelete(data) {
		return request('delete', data)
	},
	// 获取楼宇详情
	bizLocationBuildingDetail(data) {
		return request('detail', data, 'get')
	}
}
